package com.qdu.program.serviceImpl;

import com.qdu.program.entity.Read;
import com.qdu.program.mapper.ReadMapper;
import com.qdu.program.service.ReadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReadServiceImpl implements ReadService {

    @Autowired
    ReadMapper readMapper;

    @Override
    public int deleteByPrimaryKey(Integer readId) {
        return readMapper.deleteByPrimaryKey(readId);
    }

    @Override
    public int deleteByUserNumber(String userNumber) {
        return readMapper.deleteByUserNumber(userNumber);
    }

    @Override
    public int insert(Read record) {
        return readMapper.insert(record);
    }

    @Override
    public int insertSelective(Read record) {
        return readMapper.insertSelective(record);
    }

    @Override
    public Read selectByPrimaryKey(Integer readId) {
        return readMapper.selectByPrimaryKey(readId);
    }

    @Override
    public int updateByPrimaryKeySelective(Read record) {
        return readMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Read record) {
        return readMapper.updateByPrimaryKey(record);
    }

    @Override
    public Read selectOneRead(Integer id) {
        return readMapper.selectOneRead();
    }

    @Override
    public List<Read> selectTenRead() {
        return readMapper.selectTenRead();
    }

    @Override
    public List<Read> selectReadByUserNumber(String userNumber) {
        return readMapper.selectReadByUserNumber(userNumber);
    }

    @Override
    public List<Read> getAllRead() {
        return readMapper.getAllRead();
    }
}
